x = [2:.1:6];
y=.25* exp(-(x-4).^2*.5);
plot(x,y)
polyfit(x,y,2)
print -deps '~/t.pdf'

d = 5;
x = [0:.1:d-3];
y = .1 * ones(1,length(x));
x1 = x;
y1 = y;
x = [d-3:.1:d+3];
y = -.1*x.*x - .1*d*d + 2 * .1*d*x + .001*x - .001*d + .9;
%y = -0.15916 *x.*x +  0.95497 *x -0.55759;
%y = -.04 * x .* x + -.04 * d * d + 2 *-.04 .* x + 0.00 .* x + 0.00 * d + - .3;
%y = 1/sqrt(2*3.14)*exp(-.5*(x-d).^2);
x1 = [x1,x];
y1 = [y1,y];
x = [d+3:.1:10];
y = 0.1 * x - (0.1 * d) + 0.0;
x1 = [x1,x]
y1 = [y1,y]
plot(x1,y1)

x1 = [d-3:.1:d+3];
y1=-0.01 * x1 .* x1 - 0.01 * d * d + 2.0 * 0.1 * d * x1 + 0.0001 * x1 - 0.0001 * d + 0.1;
plot(x1,y1)